home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 893 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: lrz-muenchen.de!sun2!ua302aa
  2. From: ua302aa@sun2.lrz-muenchen.de (Kurt Watzka)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: windows dll
  5. Date: 9 Jan 1996 14:22:30 GMT
  6. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  7. Distribution: world
  8. Message-ID: <4cttn6$84p@sparcserver.lrz-muenchen.de>
  9. References: <4csoom$q7t@felix.teclink.net>
  10. NNTP-Posting-Host: sun2.lrz-muenchen.de
  11.  
  12. Thomas Martin <tmartin@teclink.net> writes:
  13.  
  14. >I am trying to compile someones source code for a DLL written 
  15. >in MS C7.0. I am using VC 1.0. I keep getting errors saying 
  16. >(warning C4135: conversion between different integral types).
  17.  
  18. This is not an error, it is a diagnostic message labeled as
  19. a warning. A conforming compiler is free to spit out any
  20. diagnostic message it's implementor can think of, as long as
  21. it does not fail to compile a strictly conforming program.
  22.  
  23. >An example of the lines that give the error is listed below:
  24.  
  25. >*(ptr) = pCard->byCompression|pCard->wPlayMode;
  26.  
  27. You do not tell us what a pCard is, so if we trust the use
  28. of HN of the original author, Compressiuon seems to be
  29. a byte and PlayMode seems to be a word. If the size of a
  30. word is different from a byte on your machine, you use the
  31. binary or operator on two different integral type. The 
  32. compiler issues a warning about this fact.
  33.  
  34. >It compiles fine under C7.
  35.  
  36. Maybe your compiler has an option that lets it treat 
  37. warnings as errors. This could prevent compilation in
  38. such a case.      
  39.  
  40. Kurt
  41. --
  42. | Kurt Watzka                             Phone : +49-89-2180-6254
  43. | watzka@stat.uni-muenchen.de
  44. | ua302aa@sunmail.lrz-muenchen.de
  45.  
  46.